home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1900 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: GoTo equivalent in C ??
  5. Date: Wed, 17 Jan 96 17:36:32 GMT
  6. Organization: none
  7. Message-ID: <821900192snz@genesis.demon.co.uk>
  8. References: <4d67vm$e5h@masala.cc.uh.edu> <4d8sa6$mqc@news.iag.net> <4de4ae$h6a@masala.cc.uh.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4de4ae$h6a@masala.cc.uh.edu> sukku@menudo.uh.edu "sukumar" writes:
  15.  
  16. >What does everyone do?? I have always been tempted to use goto especially in 
  17. >functions involving a lot of computation and error checking.
  18. >I have heard people say "People who don't know how to code use GOTO". I was
  19. >curious to know how guys that say this solve the above problem.
  20.  
  21. Novice programmers use goto indiscriminately because they don't know
  22. any better (that's fair enough, it might not strictly be true now since
  23. modern languages don't need goto to be introduced until much later on).
  24.  
  25. Intermediate programmers know that goto is a 'bad thing' and simply don't
  26. use them. Its probably an embarrassment being caught using a goto!
  27.  
  28. More experienced programmers recognise that you use the best tool for the
  29. job and that can sometimes (although rarely) be goto. If by avoiding goto
  30. you make the code more complex and less readable you've made a bad decision.
  31.  
  32. -- 
  33. -----------------------------------------
  34. Lawrence Kirby | fred@genesis.demon.co.uk
  35. Wilts, England | 70734.126@compuserve.com
  36. -----------------------------------------
  37.